{extend name="public:base" /}
{block name="action"}
<a type="button" class="btn btn-w-m btn-primary"
   href="{:url('dc')}">  导出
</a>
{/block}
{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight" xmlns="http://www.w3.org/1999/html">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="get">
                        <div class="row">
                            <div class="col-sm-3">
                                <input placeholder="印章名称" value="{$params['name']}" name="name" type="text"
                                       autocomplete="off"
                                       class="form-control form-control-sm">
                            </div>
                            <div class="col-sm-3">
                                <input placeholder="设备编号" value="{$params['number']}" name="number" type="text"
                                       autocomplete="off"
                                       class="form-control form-control-sm">
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group">
                                    <select class="form-control m-b" name="seal_type">
                                        <option value="" {if condition="!$params.seal_type" } selected {
                                        /if}>所有</option>
                                        {volist name="sealTypes" id="entity"}
                                        <option value="{$entity.id}" {eq name="entity.id" value="$params.seal_type"
                                                }selected {
                                        /eq}>{$entity.name}</option>
                                        {/volist}
                                    </select>
                                    <span class="input-group-append">
                                    <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> 搜索 </button>
                                </span>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table class="footable table table-stripped toggle-arrow-tiny">
                        <thead>
                        <tr>
                            <th data-toggle="true" data-sort-ignore="true">设备编号</th>
                            
                            <th data-sort-ignore="true">印章名称</th>
                            <th data-sort-ignore="true">印章类型</th>
                            <th data-sort-ignore="true">收到日期</th>
                            <th data-sort-ignore="true">过期日期</th>
                            <th data-sort-ignore="true">备注</th>
                            <th data-sort-ignore="true">状态</th>
                            <th data-sort-ignore="true">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {notempty name="list"}
                        {volist name="list" id="vo"}
                        <tr>
                            <td>{$vo.number}</td>

                            <td>{$vo.name}</td>
                            <td>{$vo.seal_type_txt}</td>
                            <td>{$vo.date_received_txt}</td>
                            <!-- <td>{$vo.expired_time_txt}</td> -->
                            <td>{$dq_time}</td>
                            <td>{$vo.remark}</td>
                            <td>{$vo.status_txt}</td>
                            <td class="project-actions">
                                <a href="{:url('edit')}?id={$vo['id']}" class="btn btn-warning btn-sm"><i
                                        class="fa fa-edit"></i> 编辑 </a>
                                {if condition="$vo['status'] eq 3 or $vo['status'] eq 4"}
                                <a href="{:url('replaceDevice')}?oldId={$vo['id']}" class="btn btn-primary btn-sm"><i
                                        class="fa fa-toggle-down"></i> 更换 </a>
                                {/if}
                                <a href="{:url('delete', ['id' => $vo['id']])}"
                                   class="btn btn-sm btn-danger ajax-del"><i class="fa fa-trash-o"></i> 删除 </a>
                            </td>
                        </tr>
                        {/volist}
                        {/notempty}
                        </tbody>
                    </table>
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}

{/block}